<?php

namespace apiend\modules\setting\models;

use Yii;

/**
 * This is the model class for table "{{%base_express}}".
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class StoreExpress extends \common\models\base\BaseExpress {

    public static $storeId;

    public function getStoreExpress() {
        return $this->hasOne(\common\models\shop\ShopStoreExpress::class, ['express_id' => 'id'])->andWhere([
            'store_id' => static::$storeId
        ])->exists();
    }

    public function fields() {
        return [
            'id',
            'storeExpress',
            'name',
            'thumb',
            'logo',
            'common',
            'telephone',
            'type',
            'abbr',
            'code',
            'regx',
            'listorder',
        ];
    }

}
